/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class SalaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression id;
	public final StringExpression nombre;
	public final IntegerExpression cant_butacas;
	
	public SalaDetachedCriteria() {
		super(orm.Sala.class, orm.SalaCriteria.class);
		id = new IntegerExpression("id", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		cant_butacas = new IntegerExpression("cant_butacas", this.getDetachedCriteria());
	}
	
	public SalaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.SalaCriteria.class);
		id = new IntegerExpression("id", this.getDetachedCriteria());
		nombre = new StringExpression("nombre", this.getDetachedCriteria());
		cant_butacas = new IntegerExpression("cant_butacas", this.getDetachedCriteria());
	}
	
	public Sala uniqueSala(PersistentSession session) {
		return (Sala) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Sala[] listSala(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Sala[]) list.toArray(new Sala[list.size()]);
	}
}

